package com.qf.borrower;

import com.qf.loanapplication.Loanapplication;
import com.qf.loanrepayment.Loanrepayment;
import lombok.Data;

import javax.persistence.*;

/**
 * @author H
 * @create 2020-11-03 14:49
 * @strive To be whoever you want to be.
 * @Description: 用户表(借款人表) borrower
 * <p>
 * id，借款人id（外键），
 * <p>
 * 凭证名称（手机号，身份证，驾驶证，等-证书、车、房），凭证照片，评估金额，评估日期
 * <p>
 * id,borrowerId,
 * <p>
 * certificateName,certificatePhoto,assessment,assessTime
 */
@Entity
@Data
@Table(name = "borrower")
public class Borrower {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private String username;
    private String password;
    private String name;
    private String sex;
    private String address;
    private String phone;
    private String identitycard;
    private String email;
    private String role;
    @Column(name = "bankname_loan")
    private String banknameLoan;
    @Column(name = "bankcardno_loan")
    private String bankcardnoLoan;

    private Double limitnum;
    @Column(name = "bankname_repayment")
    private String banknameRepayment;
    @Column(name = "bankcardno_repayment")
    private String bankcardnoRepayment;
    //备用
    private String reserve;
    //备用
    private String reserve1;

    /*与用户个人信息表联查*/
    @Transient
    private Loanrepayment loanrepayment;

    /*三表联查，loanapplication，borrower，loanrepayment*/
    @Transient
    private Loanapplication loanapplication;

}
